package com.changgou.business.controller;

import com.changgou.business.pojo.AConfig;
import com.changgou.business.service.AConfigService;
import com.changgou.entity.Result;
import com.changgou.entity.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/ad")
public class AConfigController {
    @Autowired
    private AConfigService aConfigService;

    @PostMapping("data/{cate_id}")
    public Result dataList(@PathVariable int cate_id){
        List<AConfig> dataTime = aConfigService.findDataTime(cate_id);
        return new Result(true, StatusCode.OK,"查询成功",dataTime);
    }

}
